/**
 * 
 */
package HostEuro;

import java.io.IOException;
import java.io.PrintWriter;
import java.net.ServerSocket;
import java.net.Socket;

/**
 * @author Diego2
 *
 */
public class ServidorEuro {

	
	public static void main(String[] args) {
		//startanto do servidor remoto
		ServidorRemoto remoto = new ServidorRemoto();
		
		ServerSocket servidor = null;
		Socket socket = null;
		try{
			servidor = new ServerSocket(11001);
			while(true){
				socket = servidor.accept();
				try{
					PrintWriter writer = new PrintWriter(socket.getOutputStream());
					String confirmacao = "Euro Conectado";
					writer.println(confirmacao);
					writer.close();
					System.out.println(confirmacao);
				}catch(IOException e){
					e.printStackTrace();
				}
				
			}
		}catch(Exception e){
			e.printStackTrace();
		}

	}

}
